/**
 * @projectName:hxqbNewsMiddleware
 * @packageName:com.hx.news.middleware.newsComment.service
 * @className:NewsCommentService.java
 * 
 * @createTime:2015年5月12日-下午3:51:44
 * 
 * 
 */
package com.yn.xr.middleware.news.service;

import com.yn.core.service.BaseService;
import com.yn.xr.common.page.Page;
import com.yn.xr.common.page.PageResult;
import com.yn.xr.news.mode.NewsComment;
import com.yn.xr.news.mode.NewsInfo;

/**
 * @description:
 * @fileName:NewsCommentService.java
 * @createTime:2015年5月12日 下午3:51:44
 * @author:HX1401125
 * @version 1.0.0
 * 
 */
public interface NewsCommentService extends BaseService<NewsComment, Integer>{

	/**
	 * @function:分页查询新闻回复
	 * @param newsComment
	 * @param pageNum
	 * @param pageSize
	 * @return PageResult<NewsComment>
	 * @exception
	 * @author:HX1401125
	 * @since 1.0.0
	 */
	public Page<NewsComment> queryCommentPage(String hql ,Object[] queryParams , int pageNum, int pageSize ) throws Exception;

	/**
	 * @function: 添加新闻回复
	 * @param newsComment
	 * @return
	 * @throws Exception
	 *             boolean
	 * @exception
	 * @author:HX1401125
	 * @since 1.0.0
	 */
	public void saveNewsComment(NewsComment newsComment) throws Exception;

	/**
	 * @function: 修改新闻回复
	 * @param newsComment
	 * @return
	 * @throws Exception
	 *             boolean
	 * @exception
	 * @author:HX1401125
	 * @since 1.0.0
	 */
	public boolean updateNewsComment(NewsComment newsComment) throws Exception;

	/**
	 * @function: 删除新闻回复
	 * @param newsComment
	 * @return
	 * @throws Exception
	 *             boolean
	 * @exception
	 * @author:HX1401125
	 * @since 1.0.0
	 */
	public boolean deleteNewsComment(NewsComment newsComment) throws Exception;

	/**
	 * 根据新闻ID 删除 回复
	 * 
	 * @param newsId
	 * @return
	 */
	public int deleteNewsCommentBynewsId(Integer newsId);

	/**
	 * @function: 根据ID查询新闻回复
	 * @param id
	 * @return
	 * @throws Exception
	 *             NewsComment
	 * @exception
	 * @author:HX1401125
	 * @since 1.0.0
	 */
	public NewsComment getNewsCommentById(Integer id) throws Exception;

	/**
	 * 根据新闻id获取所有的新闻评论集合
	 * 
	 * @param newsId
	 * @return
	 * @see [类、类#方法、类#成员]
	 * @author 李芳
	 * @param
	 */
	public PageResult<NewsComment> queryNewsCommentList(Integer newsId,
			Integer status, Integer pageSize, Integer pageNum);

	public int getMaxnewsPriseTimes(Integer newsId);
}
